#!/usr/bin/python
#Filename : objvar.py

class Person :
	''' Represents a person'''
	population = 0
	def __init__(self, name):
		''' Initializes the person's data.'''
		self.name = name
		print '(Initializing %s)'%self.name
		
		#When this persion is created , he/she add to the population
		Person.population +=1
	
	def __del__(self):
		'''I am dying'''
		print '%s says bye.' %self.name
		
		if Person.population == 0:
			print 'I am the last one.'
		else :
			print 'There are still %d people left.'%Person.population

	def howmany(self):
		'''Prints the current population.'''
		if Person.population == 1:
			print 'I am the only person here'
		else:
			print 'They are %d here'%Person.population 


	def sayhi(self):
		print "say hi"


swaroop = Person('issta')
swaroop.sayhi()
swaroop.howmany()


swaroop = Person('kaka still')
swaroop.sayhi()
swaroop.howmany()


swaroop.sayhi()
swaroop.howmany()
